//
//  UIImageViewAdditions.m
//  Tint
//
//  Created by Wu Kevin on 9/21/12.
//
//

#import "UIImageViewAdditions.h"

@implementation UIImageView (Tint)

- (void)setImageName:(NSString *)imageName
{
    NSString *path = nil;
    if ( [imageName isAbsolutePath] ) {
        path = imageName;
    } else {
        path = [[NSBundle mainBundle] pathForResource:imageName ofType:nil];
    }
    
    UIImage *newImage = [[UIImage alloc] initWithContentsOfFile:path];
    self.image = newImage;
    [newImage release];
}

@end
